/** @jsxImportSource @emotion/react */
import * as React from "react";
import {OriginalViewProps,} from "../../common/base";
import {createItem,} from "../../common/eHelper";
import {useRecordListSubr} from "../../hook/useRecordListSub";
import {DeviceSurvey} from "../../elevator/editor";
import {config设备概况, EntranceSetup} from "./orcBase";
import {Conclusion} from "./Conclusion";
import {ContainerInfo} from "./ContainerInfo";
import {ProjectR} from "../../gas/utilityNj/ProjectR";
import {ManufactCharacter} from "./ManufactCharacter";

export const Projects记录 = [
  {name: '特种设备监督检验证书', ha: 'Certificate', do: true},
  {name: '压力管道数据表', ha: 'ManufactCharacter',},
  {name: '系统内压力容器情况', ml: '撬装式承压设备系统内压力容器基本情况', ha: 'ContainerInfo',},
];

const recordPrintList =[
  createItem('Entrance', <EntranceSetup/>),
  createItem('ProjectList', <ProjectR nrec config={Projects记录} label={'记录目录页'}/>),
  createItem('Survey', <DeviceSurvey config={config设备概况} label={'检验证书-设备概况'}/>),
  createItem('Conclusion', <Conclusion label={'检验-下结论'}/>),
  createItem('ManufactCharacter', <ManufactCharacter label={'压力管道数据表'}/>),

  createItem('ContainerInfo', <ContainerInfo label={'撬装式承压设备系统内压力容器基本情况'}/>),
];

export const OriginalView=
  React.forwardRef((
    { action: modAction,  verId, repId='', rep}
    :OriginalViewProps, ref
  ) => {
    const {list}=useRecordListSubr(ref,rep,recordPrintList,modAction,verId);
    return <React.Fragment>
      {list}
    </React.Fragment>;
  } );
